<template>
<div>
  <h1>详情页</h1>
  {{data}}
  <h1><button @click="btn2">返回</button></h1>
</div>
</template>

<script>
export default {
  name: "new_xq",
  data(){
    return{
      data:"",
      id:this.$route.query.id
    }
  },
  methods:{
    btn(){
      this.axios.get("news_s/?id="+this.id).then(
        res=>{
          this.data=res.data
        }
      )
    },
    btn2(){
      this.$router.go(-1)
    }
  },
  mounted() {
    this.btn()
  }
}
</script>

<style scoped>

</style>
